/******************************************************************************
 * Define ark namespace
 *****************************************************************************/
var ark = {};

ark.bind = function(func, target) {
  var curryparams = [];
  for (var i = 2, argument; argument = arguments[i]; i++) {
    curryparams.push(argument);
  }
  return function() {
    var clonedparams = curryparams.slice();
    for (var j = 0, argument; argument = arguments[j]; j++) {
      clonedparams.push(argument);
    }
    func.apply(target, clonedparams);
  }
};

